package model;

import java.util.List;
import java.util.Optional;

public class Renew {
    // GetCompanyExpireDeviceListReq 类
    public static class GetCompanyExpireDeviceListReq {
        private Common.PageModel pageModel;

        public GetCompanyExpireDeviceListReq(Common.PageModel pageModel) {
            this.pageModel = pageModel;
        }

        public Common.PageModel getPageModel() {
            return pageModel;
        }

        public void setPageModel(Common.PageModel pageModel) {
            this.pageModel = pageModel;
        }
    }

    // CardInfo 类
    public static class CardInfo {
        private String device_num;  // 设备编号
        private String imsi;       // 国际移动用户识别码
        private String msisdn;     // 物联网卡号
        private String e_period;    // 到期时间
        private String card_status; // 卡片状态
        private int price;         // 续费单价 单位/分

        public CardInfo(String device_num, String imsi, String msisdn, String e_period, String card_status, int price) {
            this.device_num = device_num;
            this.imsi = imsi;
            this.msisdn = msisdn;
            this.e_period = e_period;
            this.card_status = card_status;
            this.price = price;
        }

        // Getter 和 Setter 方法
        public String getDeviceNum() { return device_num; }
        public void setDeviceNum(String device_num) { this.device_num = device_num; }

        public String getImsi() { return imsi; }
        public void setImsi(String imsi) { this.imsi = imsi; }

        public String getMsisdn() { return msisdn; }
        public void setMsisdn(String msisdn) { this.msisdn = msisdn; }

        public String getEPeriod() { return e_period; }
        public void setEPeriod(String e_period) { this.e_period = e_period; }

        public String getCardStatus() { return card_status; }
        public void setCardStatus(String card_status) { this.card_status = card_status; }

        public int getPrice() { return price; }
        public void setPrice(int price) { this.price = price; }
    }

    // GetCompanyExpireDeviceListData 类
    public static class GetCompanyExpireDeviceListData {
        private List<CardInfo> list;
        private int count;

        public GetCompanyExpireDeviceListData(List<CardInfo> list, int count) {
            this.list = list;
            this.count = count;
        }

        public List<CardInfo> getList() { return list; }
        public void setList(List<CardInfo> list) { this.list = list; }

        public int getCount() { return count; }
        public void setCount(int count) { this.count = count; }
    }

    // GetCompanyExpireDeviceListResp 类
    public static class GetCompanyExpireDeviceListResp {
        private int code;  // 状态码，1 表示成功，-1表示失败
        private String message;  // 消息描述
        private Optional<GetCompanyExpireDeviceListData> data;  // 数据，可以为 null
        private long timestamp;  // 时间戳

        public GetCompanyExpireDeviceListResp(int code, String message, Optional<GetCompanyExpireDeviceListData> data, long timestamp) {
            this.code = code;
            this.message = message;
            this.data = data;
            this.timestamp = timestamp;
        }

        public int getCode() { return code; }
        public void setCode(int code) { this.code = code; }

        public String getMessage() { return message; }
        public void setMessage(String message) { this.message = message; }

        public Optional<GetCompanyExpireDeviceListData> getData() { return data; }
        public void setData(Optional<GetCompanyExpireDeviceListData> data) { this.data = data; }

        public long getTimestamp() { return timestamp; }
        public void setTimestamp(long timestamp) { this.timestamp = timestamp; }
    }

    // CreateCompanyRenewOrderReq 类
    public static class CreateCompanyRenewOrderReq {
        private List<String> device_nums;  // 设备编号列表.不传或者为空表示续费所有待续费设备
        private String out_trade_no;        // 续费订单号.日期时间+6位随机数字,示例: 2025010817301066258

        public CreateCompanyRenewOrderReq(List<String> device_nums, String out_trade_no) {
            this.device_nums = device_nums;
            this.out_trade_no = out_trade_no;
        }

        public List<String> getDeviceNums() { return device_nums; }
        public void setDeviceNums(List<String> device_nums) { this.device_nums = device_nums; }

        public String getOutTradeNo() { return out_trade_no; }
        public void setOutTradeNo(String out_trade_no) { this.out_trade_no = out_trade_no; }
    }

    // CreateCompanyRenewOrderData 类
    public static class CreateCompanyRenewOrderData {
        private String atu_sub_mer_id;  // 子商户ID
        private String bank_code;     // 银行代码
        private String bank_message;  // 银行返回的消息
        private String hf_seq_id;      // 汇付序列号
        private String huifu_id;      // 汇付ID
        private String is_clean_split; // 是否清分
        private String party_order_id; // 合作方订单ID
        private String qr_code;       // 二维码信息
        private String req_date;      // 请求日期
        private String req_seq_id;     // 请求序列号
        private String resp_code;     // 响应代码
        private String resp_desc;     // 响应描述
        private String trade_type;    // 交易类型
        private String trans_amt;     // 交易金额
        private String trans_stat;    // 交易状态
        private String unconfirm_amt; // 未确认金额

        public CreateCompanyRenewOrderData(String atu_sub_mer_id, String bank_code, String bank_message, String hf_seq_id,
                                           String huifu_id, String is_clean_split, String party_order_id, String qr_code,
                                           String req_date, String req_seq_id, String resp_code, String resp_desc,
                                           String trade_type, String trans_amt, String trans_stat, String unconfirm_amt) {
            this.atu_sub_mer_id = atu_sub_mer_id;
            this.bank_code = bank_code;
            this.bank_message = bank_message;
            this.hf_seq_id = hf_seq_id;
            this.huifu_id = huifu_id;
            this.is_clean_split = is_clean_split;
            this.party_order_id = party_order_id;
            this.qr_code = qr_code;
            this.req_date = req_date;
            this.req_seq_id = req_seq_id;
            this.resp_code = resp_code;
            this.resp_desc = resp_desc;
            this.trade_type = trade_type;
            this.trans_amt = trans_amt;
            this.trans_stat = trans_stat;
            this.unconfirm_amt = unconfirm_amt;
        }

        // Getter 和 Setter 方法
        public String getAtuSubMerId() { return atu_sub_mer_id; }
        public void setAtuSubMerId(String atu_sub_mer_id) { this.atu_sub_mer_id = atu_sub_mer_id; }

        public String getBankCode() { return bank_code; }
        public void setBankCode(String bank_code) { this.bank_code = bank_code; }

        public String getBankMessage() { return bank_message; }
        public void setBankMessage(String bank_message) { this.bank_message = bank_message; }

        public String getHfSeqId() { return hf_seq_id; }
        public void setHfSeqId(String hf_seq_id) { this.hf_seq_id = hf_seq_id; }

        public String getHuifuId() { return huifu_id; }
        public void setHuifuId(String huifu_id) { this.huifu_id = huifu_id; }

        public String getIsCleanSplit() { return is_clean_split; }
        public void setIsCleanSplit(String is_clean_split) { this.is_clean_split = is_clean_split; }

        public String getPartyOrderId() { return party_order_id; }
        public void setPartyOrderId(String party_order_id) { this.party_order_id = party_order_id; }

        public String getQrCode() { return qr_code; }
        public void setQrCode(String qr_code) { this.qr_code = qr_code; }

        public String getReqDate() { return req_date; }
        public void setReqDate(String req_date) { this.req_date = req_date; }

        public String getReqSeqId() { return req_seq_id; }
        public void setReqSeqId(String req_seq_id) { this.req_seq_id = req_seq_id; }

        public String getRespCode() { return resp_code; }
        public void setRespCode(String resp_code) { this.resp_code = resp_code; }

        public String getRespDesc() { return resp_desc; }
        public void setRespDesc(String resp_desc) { this.resp_desc = resp_desc; }

        public String getTradeType() { return trade_type; }
        public void setTradeType(String trade_type) { this.trade_type = trade_type; }

        public String getTransAmt() { return trans_amt; }
        public void setTransAmt(String trans_amt) { this.trans_amt = trans_amt; }

        public String getTransStat() { return trans_stat; }
        public void setTransStat(String trans_stat) { this.trans_stat = trans_stat; }

        public String getUnconfirmAmt() { return unconfirm_amt; }
        public void setUnconfirmAmt(String unconfirm_amt) { this.unconfirm_amt = unconfirm_amt; }
    }

    // CreateCompanyRenewOrderResp 类
    public static class CreateCompanyRenewOrderResp {
        private int code;  // 状态码，1 表示成功，-1表示失败
        private String message;  // 消息描述
        private Optional<CreateCompanyRenewOrderData> data;  // 数据，可以为 null
        private long timestamp;  // 时间戳

        public CreateCompanyRenewOrderResp(int code, String message, Optional<CreateCompanyRenewOrderData> data, long timestamp) {
            this.code = code;
            this.message = message;
            this.data = data;
            this.timestamp = timestamp;
        }

        public int getCode() { return code; }
        public void setCode(int code) { this.code = code; }

        public String getMessage() { return message; }
        public void setMessage(String message) { this.message = message; }

        public Optional<CreateCompanyRenewOrderData> getData() { return data; }
        public void setData(Optional<CreateCompanyRenewOrderData> data) { this.data = data; }

        public long getTimestamp() { return timestamp; }
        public void setTimestamp(long timestamp) { this.timestamp = timestamp; }
    }

    // GetCompanyRenewStatusReq 类
    public static class GetCompanyRenewStatusReq {
        private String out_trade_no;  // 续费订单号.日期时间+6位随机数字,示例: 2025010817301066258

        public GetCompanyRenewStatusReq(String out_trade_no) {
            this.out_trade_no = out_trade_no;
        }

        public String getOutTradeNo() { return out_trade_no; }
        public void setOutTradeNo(String out_trade_no) { this.out_trade_no = out_trade_no; }
    }

    // GetCompanyRenewStatusData 类
    public static class GetCompanyRenewStatusData {
        private String out_trade_no;  // 订单号
        private int total_fee;       // 总金额 分
        private int num;            // 数量
        private String device_num;   // 设备号
        private String iot_phone;    // 卡号
        private String maturity_at;  // 到期时间
        private int renew_fee;       // 设备续费金额
        private int is_paid;         // 是否支付
        private int renew_state;     // 处理状态
        private String payment_at;   // 支付成功时间
        private String success_at;   // 处理成功时间

        public GetCompanyRenewStatusData(String out_trade_no, int total_fee, int num, String device_num, String iot_phone,
                                         String maturity_at, int renew_fee, int is_paid, int renew_state, String payment_at,
                                         String success_at) {
            this.out_trade_no = out_trade_no;
            this.total_fee = total_fee;
            this.num = num;
            this.device_num = device_num;
            this.iot_phone = iot_phone;
            this.maturity_at = maturity_at;
            this.renew_fee = renew_fee;
            this.is_paid = is_paid;
            this.renew_state = renew_state;
            this.payment_at = payment_at;
            this.success_at = success_at;
        }

        // Getter 和 Setter 方法
        public String getOutTradeNo() { return out_trade_no; }
        public void setOutTradeNo(String out_trade_no) { this.out_trade_no = out_trade_no; }

        public int getTotalFee() { return total_fee; }
        public void setTotalFee(int total_fee) { this.total_fee = total_fee; }

        public int getNum() { return num; }
        public void setNum(int num) { this.num = num; }

        public String getDeviceNum() { return device_num; }
        public void setDeviceNum(String device_num) { this.device_num = device_num; }

        public String getIotPhone() { return iot_phone; }
        public void setIotPhone(String iot_phone) { this.iot_phone = iot_phone; }

        public String getMaturityAt() { return maturity_at; }
        public void setMaturityAt(String maturity_at) { this.maturity_at = maturity_at; }

        public int getRenewFee() { return renew_fee; }
        public void setRenewFee(int renew_fee) { this.renew_fee = renew_fee; }

        public int getIsPaid() { return is_paid; }
        public void setIsPaid(int is_paid) { this.is_paid = is_paid; }

        public int getRenewState() { return renew_state; }
        public void setRenewState(int renew_state) { this.renew_state = renew_state; }

        public String getPaymentAt() { return payment_at; }
        public void setPaymentAt(String payment_at) { this.payment_at = payment_at; }

        public String getSuccessAt() { return success_at; }
        public void setSuccessAt(String success_at) { this.success_at = success_at; }
    }

    // GetCompanyRenewStatusResp 类
    public static class GetCompanyRenewStatusResp {
        private int code;  // 状态码，1 表示成功，-1表示失败
        private String message;  // 消息描述
        private Optional<GetCompanyRenewStatusData> data;  // 数据，可以为 null
        private long timestamp;  // 时间戳

        public GetCompanyRenewStatusResp(int code, String message, Optional<GetCompanyRenewStatusData> data, long timestamp) {
            this.code = code;
            this.message = message;
            this.data = data;
            this.timestamp = timestamp;
        }

        public int getCode() { return code; }
        public void setCode(int code) { this.code = code; }

        public String getMessage() { return message; }
        public void setMessage(String message) { this.message = message; }

        public Optional<GetCompanyRenewStatusData> getData() { return data; }
        public void setData(Optional<GetCompanyRenewStatusData> data) { this.data = data; }

        public long getTimestamp() { return timestamp; }
        public void setTimestamp(long timestamp) { this.timestamp = timestamp; }
    }
}